using ExtendedMvc.Ajax;
using ExtendedMvc.Html;

namespace ExtendedMvc.Elements {
	public class ResetButton : ButtonBase<ResetButton> {
		private string _formId;

		public ResetButton(string caption, string formId, string name = null, string id = null)
			: base(HtmlButtonType.Reset, caption, name, id) {
			_formId = formId;
		}

		protected override void Prepare() {
			OnClick(string.Format(JavaScriptHelper.Reset, _formId));
			base.Prepare();
		}
	}
}